package com.hundred.item.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.hundred.item.dao.TopItemDAO;
import com.hundred.item.dao.dataobject.TopItemDO;
import com.hundred.item.manager.impl.TopItemManagerImpl;

public class TopItemDAOImpl extends SqlMapClientDaoSupport implements TopItemDAO {

	private static final Logger logger = LoggerFactory.getLogger(TopItemDAOImpl.class);

	
	public long insertTopItem(TopItemDO topItemDO) {
		// TODO Auto-generated method stub
		return 0;
	}

	public List<TopItemDO> queryTopItemList(long limitNum) {

		@SuppressWarnings("unchecked")
		List<TopItemDO> topItems = this.getSqlMapClientTemplate().queryForList("TopItemDAO.selectTopItemList", limitNum);
		
		if(topItems!=null){
			return topItems;
		}
		
		logger.error("Top-item-Null");
		
		return new ArrayList<TopItemDO>();
	}

}
